Dynomotion

Group: DynoMotion Message: 595 From: bob.garrish Date: 8/19/2010
Subject: Torque control, loop tuning
In regards to tuning our amplifiers under current control, we could get a stable oscillation by messing around with the tach grounded, but could just never get it to stand still. Have any tips on using D or the feed forward to settle it down? Should we be using accel feed forward instead of velocity feed forward? What sort of magnitude should D be in relation to P (equal, 1/10th, 1/100th, 10X?) if we try that? It's a bit disconcerting having the machine oscillating like that, so I'd like to have a good starting idea when I'm tuning it in real time!

I've also been tuning the loop using a move and trying to get the error down really low in encoder counts, but it appears there's a way to do it with a step response? None of the material I've found has been all that useful in that regard, even though I think it might be a good way to tune a tight loop. Is the idea just to use a small step size and tune down the error the same way one would when using a move to do it?

I've found that I can get to much higher gain settings by using the pole-zero filters and can then often knock down the noise (ringing) by using a low pass. Is there some danger in getting the much higher proportional gains this way or is it just a good way to get a tighter loop? There's not much information to be found online about the pole-zero filters; your site shows up relatively early in the search results.

Is the output gain on a channel a real gain, or does it just scale the DAC response? IE: on my gain 0.5 X axis am I getting 2048 counts of resolution inside of 5V or is it just scaling my DAC output count by 0.5 and so I'm actually getting 1024 counts?
Group: DynoMotion Message: 596 From: Tom Kerekes Date: 8/19/2010
Subject: Re: Torque control, loop tuning
To operate in current mode damping will be required to get stable operation.  Unlike velocity mode, current mode is inherently unstable and simple P gain will NOT be stable unless your system has a lot of viscous friction.  Try increasing D gain to add damping.  You can not start with an unstable system (continuous oscillation).  First reduce the P gain until the system is stable.  Even with zero P gain the D gain should provide damping.  If you are able to manually rotate the motor it should feel like viscus friction (opposing force proportional to velocity).  Increase the D gain as much as possible until the velocity loop itself becomes unstable, then back off by a factor of 2~4.  The numeric value for D will depend on your system, but a value of 10 is typical.  If your system is simulating encoder output from a resolver it may be delayed and not effective in providing phase lead.  You may also need to add a low pass filter (possibly at ~500Hz or higher) to smooth the output if it becomes too "spikey" because of taking the derivative of encoder position with quantization error (steps).
Check the response by making "Moves" rather than "Steps".  The Step Response of more than a few counts usually causes saturation that can make the response difficult to interpret.  In normal operation the errors should be small and not cause saturation.
Feed Forward has nothing to do with servo response.  Keep it zero while tuning the servo.
Gain values themselves don't really have much meaning.  Higher values don't necessarily have better performance.
There is no benefit to setting the output gain to 0.5.  1024 DAC counts is still 5V.  Leave it set to 1.0 to avoid confusion.
I hope this helps.
TK